<?php 
 
/**
 * @package	Joomla.Tutorials
 * @subpackage	Module
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @license	License GNU General Public License version 2 or later; see LICENSE.txt
 */
 
// No direct access to this file
defined('_JEXEC') or die;
 
class modXSTurnTodayHelper
{
	public static function getGreeting() {
		return "Message from the helper";
	}
 
	public static function getList() {
	   //die('++++');
		$db = JFactory::getDBO();
		$w = date('w')+1;
        //$query = $db->getQuery(true);
		$query = $db->getQuery(true);
		$query->select('name,alias');
		$query->from('#__xs_location');
		$query->where('status=1');
        $query->where("lich LIKE '%".$w."%'");
		$query->order('name ASC,area ASC,ordering ASC');
		
		$list = $db->setQuery($query);
		$list = $db->loadObjectList();
		if($list)
		{
			return $list;
		}
		return NULL;
	}
}